<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%String root = request.getContextPath(); %>
<br>   
<table border="1">
<tr>
<h3>List</h3>
</tr>
<tr align="center" style="color:white; background-color:black">
	<td width="50">no</td>
	<td width="50">seq</td>
	<td width="200">subject</td>
	<td>modi</td>
	<td>del</td>
<tr>
<s:if test="%{list==null || list.size() == 0}">
	<tr>
		<td colspan="10" class="text_gray">
		작성된 글이 없습니다.
		</td>
	</tr>
</s:if>
<s:else>
<s:iterator status="stat" value="%{list}">
	<tr bgcolor='<s:if test="#stat.odd">lightgrey</s:if>'>
		<td><s:property value="%{#stat.index+1}"/>
		<td><s:property value="%{seq}"/></td>
		<td><s:property value="%{subject}"/></td>
		</td>
		<td><input type="button" value="수정" onclick="javascript:modi('<s:property value="%{seq}"/>');">
		</td>
		<td><s:form action="del" theme="simple">
				<input type="hidden" name="seq" 
				value="<s:property value="%{seq}" />"> 
				<s:submit value="삭제"/>
			</s:form>
		</td>
	</tr>
</s:iterator>
</s:else>
</table>
